package com.tb.dubbo_service;

import com.tb.dubbo.IcommentsService;
import com.tb.mapper.CommentsMapper;
import com.tb.pojo.Comments;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/*商品评论*/
@Service
public class CommentsServiceImpl implements IcommentsService {
    @Autowired
    private CommentsMapper commentsMapper;
    /*商品评论*/
    @Override
    public List<Comments> getAllComments(Map<String,Object> map) {
        return commentsMapper.selectCommentsByUserId(map);
    }

    @Override
    public int insert(Comments comments) {
        int flag = commentsMapper.insert(comments);
        return flag;
    }
}
